package HomeWork2.Student;

public class Student {
    private String name;
    private String gender;
    private int age;
    private int id;
    private double score;

    //第六题
    private String major;
//Constructor===========================================
    public Student() {

    }

    public Student(String name, String gender, int age, int id, double score) {
        this.name = name;
        this.gender = gender;
        this.age = age;
        this.id = id;
        this.score = score;
    }

    public Student(String name, String gender, int age, String major) {
        this.name = name;
        this.gender = gender;
        this.age = age;
        this.major = major;
    }

    //Getter and Setter=====================================
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public double getScore() {
        return score;
    }

    public void setScore(double score) {
        this.score = score;
    }

    public String getMajor() {
        return major;
    }

    public void setMajor(String major) {
        this.major = major;
    }

    //Method==========================================================
    public void say(){
        System.out.println("姓名："+getName());
        System.out.println("性别："+this.getGender());
        System.out.println("年龄："+this.getAge());
        System.out.println("学号："+this.getId());
        System.out.println("分数："+this.getScore());
    }

    public void show(){
        System.out.println(this.name+"\t"+this.gender+"\t"+this.age+"\t"+this.major);

    }
}
